<?php
    /**
    * This is the model class for Model.
    *
    * @property string $lang
    * @property string $class
    */
    class Model extends CActiveRecord
    {
        public $lang = 'vi';
        public $class;
        public $baseUrl;

        public function __construct(){
            $this->lang = !empty(Yii::app()->request->cookies['lang']->value) ? Yii::app()->request->cookies['lang']->value : $this->lang;
            $this->class = get_class($this);
            $this->baseUrl = Yii::app()->getBaseUrl(TRUE);
        }

}